import type { ParamsType } from '@/types/home'
import type { HotResut } from '@/types/hot'
import { http } from '@/utils/request'

type HotParams = ParamsType & { subType?: string }

/**
 * 通用接口：获取热门推荐的数据
 * @param url 请求地址
 * @param data 请求参数 - 可选
 */
export const getHotRecommendAPI = (url: string, data?: HotParams) => {
  return http<HotResut>({
    url,
    method: 'GET',
    data
  })
}